<?php
/**
* 
*/
class zhuyeView extends GetLoad
{
	

    public function panduanxiugai($name){ //判断是否是已登录人的自己的主页

        if(isset($_COOKIE['name']) and $_COOKIE['name']==$name ){
          
            return 1;
        }else{
            
            return 0;
        }
    }


    

	function jianliView($data){
		$this->load("Controller/user");
		$daohang =new ControllerName();
		$daohang->Getname(0);//判断是否在文章浏览页面上
		
?>

   	<div style="margin-left:auto; margin-right:auto;" class="container" >    
        
        	<div class="container col-sm-8"  >
            	<div style="margin-top:30px;">

                   <a class="media-left" href="#" >
                        <img class="media-object img-circle" <?php echo "src='".$data['touxiang']."'" ?> alt="媒体对象" style="height:100px; width:100px; background-color: #CCC">
                    </a>


                	<h1 style="font-size:50px;"><?php echo $data['huanyingyu']; ?></h1>


                    <h4 class=" text-muted"><?php echo $data['xuanyan']; ?></h4>


                     <?php if($this->panduanxiugai($data['name'])) { ?>

                        <button class=" glyphicon glyphicon-pencil" data-toggle="modal" data-target="#myModal">
                        
                        </button>

                  


                         <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                            <div class="modal-dialog">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <h4 class="modal-title" id="myModalLabel">
                                            请修改
                                        </h4>
                                    </div>

                                        <form class="form-horizontal" role="form" <?php  echo "action='./index.php?route=system/sever/Denglu/huanyingyuxiugai&=".$data['name_id']."'";  ?> method="post" >
                                            <div class="form-group">
                                                <label for="firstname" class="col-sm-2 control-label">欢迎语</label>
                                                <div class="col-sm-10">
                                                    <input type="text" class="form-control" id="firstname" 
                                                           placeholder="请输入欢迎语" name="huanyingyu">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="lastname" class="col-sm-2 control-label">宣言</label>
                                                <div class="col-sm-10">
                                                    <input type="text" class="form-control" id="lastname" 
                                                           placeholder="请输入个性宣言" name="xuanyan">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <div class="col-sm-offset-2 col-sm-10">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <div class="col-sm-offset-2 col-sm-10">
                                                    <button type="submit" class="btn btn-default">提交</button>
                                                </div>
                                            </div>
                                        </form>

                                    
                                </div><!-- /.modal-content -->
                            </div><!-- /.modal -->
                        </div>
                    <?php }?>
                </div>
                <?php foreach ($data['information'] as $information) { ?>
                <div class="container page-header" style="margin-top:30px; width:100%">
                	
                	<?php echo "<h1><a href='".$information['url']."'>".$information['title']."</a></h1>"; ?>

                         <?php if($this->panduanxiugai($data['name'])) { ?>

                            <button type="button" class="btn btn-default btn-sm">
                              <a <?php echo "href='./index.php?route=Controller/informationxiugai/ControllerInformationxiugai/information&=".$information["information_id"]."'";?> ><span class="glyphicon glyphicon-pencil"></span> </a>
                            </button>
                            <button type="button" class="btn btn-default btn-sm">
                              <a <?php echo "href='./index.php?route=Controller/informationxiugai/ControllerInformationxiugai/informationshanchu&=".$information["information_id"]."/".$information['title']."'";?> ><span class="glyphicon glyphicon-trash"></span> </a>
                            </button>

                         <?php } ?>
                        <ol class="breadcrumb" style="width:300px;">
                            <li><a href="#"><?php echo $data['name']; ?></a></li>
                            <li><a href="#"><?php echo $information['nian']; ?></a></li>
                            <li><a href="#"><?php echo $information['yue']; ?></a></li>
                            <li><a href="#"><?php echo $information['ri']; ?></a></li>
                        </ol>
                </div>   
                <div style="width:100%;font-size:24px;">
                    <p><?php echo $information['neirong']; ?></p>
                </div>   
				<?php } ?>
         	</div>
           
         <div class="col-sm-4" style="margin-top:300px;">
         	<div class="well">
            	<ul>
                	<li><h4>你好，欢迎来到博客</h4></li>
                    <li><iframe allowtransparency="true" frameborder="0" width="170" height="20" scrolling="no" src="//tianqi.2345.com/plugin/widget/index.htm?s=3&z=1&t=1&v=0&d=1&bd=0&k=&f=&ltf=009944&htf=cc0000&q=1&e=0&a=1&c=54511&w=317&h=28&align=center"></iframe></li>
                    <li>冬天</li>
                    <li>请注意保暖</li>
                </ul>   
            </div>
            <div style="margin-top:40px;">
            	<h4>文章概览</h4>
                <em style="font-size:25px;">欢迎</em>
              
                <p><a href="#">代做</a></p>
             
            </div>
            	
            
         </div>
            
       </div>
    </div>

    
</body>
</html>
<?php   

		
	}

}




?>